#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Rev(i,a,b) for(int i=a;i>=b;i--)
#define Fin(file) freopen(file,"r",stdin)
#define Fout(file) freopen(file,"w",stdout)
#define fi first
#define se second
using namespace std; using ll = long long;
constexpr int N=1e5+5; using pii = pair<int,int>;
int n,m,Q,qx[N],qy[N],qd[N],D[N]; vector<int> to[N]; 
namespace Solve2{
    bool condition() { return n<=1000&&m<=1000&&Q<=1000; }
    pii operator- (const pii& A,int x) { return pii(A.fi-x,A.se); }
    struct Node{
        int type,A,B,len; pii mxA,mxB; int mnA,mnB; Node *lc,*rc,*fa;
        Node() { type=A=B=len=0; mxA=mxB=pii(-1e9,0); }
        Node(int u,int pa) { type=0; A=pa; B=u; len=1; mxA=mxB=pii(-1e9,0); }
        void build(int _type,Node* _lc,Node* _rc){
            type=_type; lc=_lc; rc=_rc; lc->fa=rc->fa=this;
            if(type==1) A=lc->A,B=rc->B,len=lc->len+rc->len;
            else A=lc->A,B=lc->B,len=lc->len;
            mxA=mxB=pii(-1e9,0);
        }
        void set(int d) { assert(type==0); mxA=pii(d-1,B); mxB=pii(d,B); }
        void reset() { assert(type==0); mxA=mxB=pii(-1e9,0); }
        void set2() { mnA=1; mnB=0; }
        void reset2() { mnA=mnB=1e9; }
        void update(){
            assert(type);
            if(type==1){
                mxA=max(lc->mxA,rc->mxA-lc->len);
                mxB=max(rc->mxB,lc->mxB-rc->len);
                mnA=min(lc->mnA,rc->mnA+lc->len);
                mnB=min(rc->mnB,lc->mnB+rc->len);
            }
            else{
                mxA=max(lc->mxA,rc->mxA);
                mxB=max(lc->mxB,rc->mxA-lc->len);
                mnA=min(lc->mnA,rc->mnA);
                mnB=min(lc->mnB,rc->mnA+lc->len);
            }
        }
        static Node pool[N*2]; static int poolcnt;
        void* operator new(size_t) { return &pool[++poolcnt]; }
    };
    Node Node::pool[N*2]; int Node::poolcnt=0;
    int siz[N],son[N]; Node* O[N];
    void dfs1(int u,int pa) { siz[u]=1; for(int v:to[u]) if(v!=pa) { dfs1(v,u),siz[u]+=siz[v]; if(siz[v]>siz[son[u]]) son[u]=v; } }
    Node* Bundle(vector<pair<int,Node*>>::iterator Lp,vector<pair<int,Node*>>::iterator Rp,int type){
        if(Lp+1==Rp) return Lp->se;
        auto Mid=lower_bound(Lp,Rp,make_pair((Lp->fi+prev(Rp)->fi)/2,(Node*)0)); if(Mid==Lp) Mid++;; if(Mid==Rp) Mid--;
        auto lc=Bundle(Lp,Mid,type), rc=Bundle(Mid,Rp,type), res=new Node; res->build(type,lc,rc); return res;
    }
    Node* dfs2(int u,int pa){
        // cerr<<"u="<<u<<'\n';
        vector<pair<int,Node*>> lis; lis.emplace_back(1,O[u]=new Node(u,pa));
        for(int w=u,lst=pa; son[w]; lst=w,w=son[w]){
            vector<pair<int,Node*>> tmp; tmp.emplace_back(1,O[son[w]]=new Node(son[w],w));
            for(int v:to[w]) if(v!=lst&&v!=son[w]) tmp.emplace_back(tmp.back().fi+siz[v],dfs2(v,w));
            lis.emplace_back(lis.back().fi+tmp.back().fi,Bundle(tmp.begin(),tmp.end(),2));
        }
        return Bundle(lis.begin(),lis.end(),1);
    }
    void reset(int u){
        O[u]->reset(); for(auto o=O[u]->fa;o;o=o->fa) o->update();
    }
    [[noreturn]] void solve(){
        dfs1(1,0); dfs2(1,0);
        static int ans[N];
        For(Y,1,n){
            For(i,1,n) O[i]->set(D[i]);
            For(i,1,Node::poolcnt) if(Node::pool[i].type) Node::pool[i].update();
            static int q[N]; int h=0,t=0; q[t++]=Y; reset(Y);
            while(h<t){
                int u=q[h++]; //cerr<<"u="<<u<<'\n';
                while(true){
                    pii mx(-1e9,0); int dA=1,dB=0;
                    for(auto o=O[u]->fa,lst=O[u]; o; lst=o,o=o->fa){
                        if(o->type==1){
                            if(lst==o->lc) mx=max(mx,o->rc->mxA-dB), dB+=o->rc->len;
                            else mx=max(mx,o->lc->mxB-dA), dA+=o->lc->len;
                        }
                        else{
                            if(lst==o->lc) mx=max(mx,o->rc->mxA-dA);
                            else mx=max(mx,o->lc->mxA-dA), dB=dA+o->lc->len;
                        }
                    }
                    if(mx.fi>=0) reset(q[t++]=mx.se); else break;
                }
            }
            For(i,1,n) O[i]->reset2();
            For(i,0,t-1) O[q[i]]->set2();
            For(i,1,Node::poolcnt) if(Node::pool[i].type) Node::pool[i].update();
            For(i,1,Q) if(qy[i]==Y) {
                if(O[qx[i]]->mnB!=1e9) { ans[i]=1; continue; }
                int OK=0; int dA=1,dB=0;
                for(auto o=O[qx[i]]->fa,lst=O[qx[i]]; o; lst=o,o=o->fa){
                    int mn;
                    if(o->type==1){
                        if(lst==o->lc) mn=o->rc->mnA+dB, dB+=o->rc->len;
                        else mn=o->lc->mnB+dA, dA+=o->lc->len;
                    }
                    else{
                        if(lst==o->lc) mn=o->rc->mnA+dA;
                        else mn=o->lc->mnA+dA, dB=dA+o->lc->len;
                    }
                    if(mn<=qd[i]) { OK=1; break; }
                }
                ans[i]=OK;
            }
        }
        For(i,1,Q) cout<<(ans[i]?"YES\n":"NO\n");
        exit(0);
    }
}
namespace SolveC{
    bool condition() { For(i,1,Q) if(qy[i]!=1) return false;;; return true; }
    pii operator- (const pii& A,int x) { return pii(A.fi-x,A.se); }
    struct Node{
        int type,A,B,len; pii mxA,mxB; int mnA,mnB; Node *lc,*rc,*fa;
        Node() { type=A=B=len=0; mxA=mxB=pii(-1e9,0); }
        Node(int u,int pa) { type=0; A=pa; B=u; len=1; mxA=mxB=pii(-1e9,0); }
        void build(int _type,Node* _lc,Node* _rc){
            type=_type; lc=_lc; rc=_rc; lc->fa=rc->fa=this;
            if(type==1) A=lc->A,B=rc->B,len=lc->len+rc->len;
            else A=lc->A,B=lc->B,len=lc->len;
            mxA=mxB=pii(-1e9,0);
        }
        void set(int d) { assert(type==0); mxA=pii(d-1,B); mxB=pii(d,B); }
        void reset() { assert(type==0); mxA=mxB=pii(-1e9,0); }
        void set2() { mnA=1; mnB=0; }
        void reset2() { mnA=mnB=1e9; }
        void update(){
            assert(type);
            if(type==1){
                mxA=max(lc->mxA,rc->mxA-lc->len);
                mxB=max(rc->mxB,lc->mxB-rc->len);
                mnA=min(lc->mnA,rc->mnA+lc->len);
                mnB=min(rc->mnB,lc->mnB+rc->len);
            }
            else{
                mxA=max(lc->mxA,rc->mxA);
                mxB=max(lc->mxB,rc->mxA-lc->len);
                mnA=min(lc->mnA,rc->mnA);
                mnB=min(lc->mnB,rc->mnA+lc->len);
            }
        }
        static Node pool[N*2]; static int poolcnt;
        void* operator new(size_t) { return &pool[++poolcnt]; }
    };
    Node Node::pool[N*2]; int Node::poolcnt=0;
    int siz[N],son[N]; Node* O[N];
    void dfs1(int u,int pa) { siz[u]=1; for(int v:to[u]) if(v!=pa) { dfs1(v,u),siz[u]+=siz[v]; if(siz[v]>siz[son[u]]) son[u]=v; } }
    Node* Bundle(vector<pair<int,Node*>>::iterator Lp,vector<pair<int,Node*>>::iterator Rp,int type){
        if(Lp+1==Rp) return Lp->se;
        auto Mid=lower_bound(Lp,Rp,make_pair((Lp->fi+prev(Rp)->fi)/2,(Node*)0)); if(Mid==Lp) Mid++;; if(Mid==Rp) Mid--;
        auto lc=Bundle(Lp,Mid,type), rc=Bundle(Mid,Rp,type), res=new Node; res->build(type,lc,rc); return res;
    }
    Node* dfs2(int u,int pa){
        // cerr<<"u="<<u<<'\n';
        vector<pair<int,Node*>> lis; lis.emplace_back(1,O[u]=new Node(u,pa));
        for(int w=u,lst=pa; son[w]; lst=w,w=son[w]){
            vector<pair<int,Node*>> tmp; tmp.emplace_back(1,O[son[w]]=new Node(son[w],w));
            for(int v:to[w]) if(v!=lst&&v!=son[w]) tmp.emplace_back(tmp.back().fi+siz[v],dfs2(v,w));
            lis.emplace_back(lis.back().fi+tmp.back().fi,Bundle(tmp.begin(),tmp.end(),2));
        }
        return Bundle(lis.begin(),lis.end(),1);
    }
    void reset(int u){
        O[u]->reset(); for(auto o=O[u]->fa;o;o=o->fa) o->update();
    }
    [[noreturn]] void solve(){
        dfs1(1,0); dfs2(1,0);
        For(i,1,n) O[i]->set(D[i]);
        For(i,1,Node::poolcnt) if(Node::pool[i].type) Node::pool[i].update();
        static int q[N]; int h=0,t=0; q[t++]=1; reset(1);
        while(h<t){
            int u=q[h++]; //cerr<<"u="<<u<<'\n';
            while(true){
                pii mx(-1e9,0); int dA=1,dB=0;
                for(auto o=O[u]->fa,lst=O[u]; o; lst=o,o=o->fa){
                    if(o->type==1){
                        if(lst==o->lc) mx=max(mx,o->rc->mxA-dB), dB+=o->rc->len;
                        else mx=max(mx,o->lc->mxB-dA), dA+=o->lc->len;
                    }
                    else{
                        if(lst==o->lc) mx=max(mx,o->rc->mxA-dA);
                        else mx=max(mx,o->lc->mxA-dA), dB=dA+o->lc->len;
                    }
                }
                if(mx.fi>=0) reset(q[t++]=mx.se); else break;
            }
        }
        For(i,1,n) O[i]->reset2();
        For(i,0,t-1) O[q[i]]->set2();
        For(i,1,Node::poolcnt) if(Node::pool[i].type) Node::pool[i].update();
        For(i,1,Q){
            if(O[qx[i]]->mnB!=1e9) { cout<<"YES\n"; continue; }
            int OK=0; int dA=1,dB=0;
            for(auto o=O[qx[i]]->fa,lst=O[qx[i]]; o; lst=o,o=o->fa){
                int mn;
                if(o->type==1){
                    if(lst==o->lc) mn=o->rc->mnA+dB, dB+=o->rc->len;
                    else mn=o->lc->mnB+dA, dA+=o->lc->len;
                }
                else{
                    if(lst==o->lc) mn=o->rc->mnA+dA;
                    else mn=o->lc->mnA+dA, dB=dA+o->lc->len;
                }
                if(mn<=qd[i]) { OK=1; break; }
            }
            cout<<(OK?"YES\n":"NO\n");
        }
        exit(0);
    }
}
int main(){
    Fin("shu.in"); Fout("shu.out");
    ios::sync_with_stdio(0); cin.tie(0);
    cin>>n>>m>>Q; For(i,1,n-1) { int x,y; cin>>x>>y; to[x].push_back(y); to[y].push_back(x); }
    For(i,1,Q) cin>>qx[i]>>qy[i]>>qd[i];; For(i,1,m) { int x,y; cin>>x>>y; D[x]=max(D[x],y); }
    if(SolveC::condition()) SolveC::solve();
    if(Solve2::condition()) Solve2::solve();
    return 0;
}